<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Sifteo::MappedVolume Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>Sifteo</b></li><li class="navelem"><a class="el" href="class_sifteo_1_1_mapped_volume.html">MappedVolume</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_sifteo_1_1_mapped_volume-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Sifteo::MappedVolume Class Reference<div class="ingroups"><a class="el" href="group__filesystem.html">Filesystem</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a> that has been mapped into the secondary flash memory region.  
 <a href="class_sifteo_1_1_mapped_volume.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="filesystem_8h_source.html">sifteo/filesystem.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aeea250067b90bc93a884b93068e10ace"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeea250067b90bc93a884b93068e10ace"></a>
typedef <a class="el" href="class_sifteo_1_1_asset_configuration.html">AssetConfiguration</a><br class="typebreak"/>
&lt; MAX_BOOTSTRAP_GROUPS &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#aeea250067b90bc93a884b93068e10ace">BootstrapAssetConfiguration</a></td></tr>
<tr class="memdesc:aeea250067b90bc93a884b93068e10ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">An <a class="el" href="class_sifteo_1_1_asset_configuration.html" title="An AssetConfiguration represents an arrangement of AssetGroups to load.">AssetConfiguration</a> large enough to hold all bootstrap groups. <br/></td></tr>
<tr class="separator:aeea250067b90bc93a884b93068e10ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3f539e70963c3f919210a1bfc0b0ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e3f539e70963c3f919210a1bfc0b0ad"></a>
typedef <a class="el" href="class_sifteo_1_1_array.html">Array</a>&lt; <a class="el" href="struct_sifteo_1_1_asset_group.html">AssetGroup</a>, <br class="typebreak"/>
MAX_BOOTSTRAP_GROUPS &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a2e3f539e70963c3f919210a1bfc0b0ad">BootstrapAssetGroups</a></td></tr>
<tr class="memdesc:a2e3f539e70963c3f919210a1bfc0b0ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">An array large enough to hold all bototstrap AssetGroups. <br/></td></tr>
<tr class="separator:a2e3f539e70963c3f919210a1bfc0b0ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a36b85238813ba12465f54ee253a6c0fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a36b85238813ba12465f54ee253a6c0fc">attach</a> (<a class="el" href="class_sifteo_1_1_volume.html">Volume</a> vol)</td></tr>
<tr class="memdesc:a36b85238813ba12465f54ee253a6c0fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach this <a class="el" href="class_sifteo_1_1_mapped_volume.html" title="A Volume that has been mapped into the secondary flash memory region.">MappedVolume</a> to a new volume.  <a href="#a36b85238813ba12465f54ee253a6c0fc">More...</a><br/></td></tr>
<tr class="separator:a36b85238813ba12465f54ee253a6c0fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2777e48c491450af1164acd47da5a6a6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2777e48c491450af1164acd47da5a6a6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a2777e48c491450af1164acd47da5a6a6">getBootstrap</a> (<a class="el" href="class_sifteo_1_1_mapped_volume.html#a2e3f539e70963c3f919210a1bfc0b0ad">BootstrapAssetGroups</a> &amp;groups, <a class="el" href="class_sifteo_1_1_mapped_volume.html#aeea250067b90bc93a884b93068e10ace">BootstrapAssetConfiguration</a> &amp;config)</td></tr>
<tr class="memdesc:a2777e48c491450af1164acd47da5a6a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the bootstrap assets for this <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>, returning the result in the provided BootstrapAssetConfiguration array. <br/></td></tr>
<tr class="separator:a2777e48c491450af1164acd47da5a6a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add9790f82b30c3f4226589d3d47fae54"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#add9790f82b30c3f4226589d3d47fae54">MappedVolume</a> ()</td></tr>
<tr class="memdesc:add9790f82b30c3f4226589d3d47fae54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a detached <a class="el" href="class_sifteo_1_1_mapped_volume.html" title="A Volume that has been mapped into the secondary flash memory region.">MappedVolume</a>.  <a href="#add9790f82b30c3f4226589d3d47fae54">More...</a><br/></td></tr>
<tr class="separator:add9790f82b30c3f4226589d3d47fae54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30d71f4ac5f9e4e5cb7e3a7fb465ccbc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a30d71f4ac5f9e4e5cb7e3a7fb465ccbc">MappedVolume</a> (<a class="el" href="class_sifteo_1_1_volume.html">Volume</a> vol)</td></tr>
<tr class="memdesc:a30d71f4ac5f9e4e5cb7e3a7fb465ccbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Map a view of the provided <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>.  <a href="#a30d71f4ac5f9e4e5cb7e3a7fb465ccbc">More...</a><br/></td></tr>
<tr class="separator:a30d71f4ac5f9e4e5cb7e3a7fb465ccbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa996a30a54f8ad245c0299c00a1e2152"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#aa996a30a54f8ad245c0299c00a1e2152">metadata</a> (unsigned key, unsigned minSize, unsigned *actualSize) const </td></tr>
<tr class="memdesc:aa996a30a54f8ad245c0299c00a1e2152"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up a metadata value from the mapped <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>.  <a href="#aa996a30a54f8ad245c0299c00a1e2152">More...</a><br/></td></tr>
<tr class="separator:aa996a30a54f8ad245c0299c00a1e2152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5cd63cd63e7887ccb64457010ff5445"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:af5cd63cd63e7887ccb64457010ff5445"><td class="memTemplItemLeft" align="right" valign="top">const T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#af5cd63cd63e7887ccb64457010ff5445">metadata</a> (unsigned key, unsigned *actualSize=<a class="el" href="group__macros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) const </td></tr>
<tr class="memdesc:af5cd63cd63e7887ccb64457010ff5445"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up a metadata value from the mapped <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>. The result is cast to a constant pointer of the indicated type, and we require that the metadata value is at least as large as sizeof(T).  <a href="#af5cd63cd63e7887ccb64457010ff5445">More...</a><br/></td></tr>
<tr class="separator:af5cd63cd63e7887ccb64457010ff5445"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd2ea259e09668217ed2c280ff3c980b"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#abd2ea259e09668217ed2c280ff3c980b">package</a> (const char *placeholder=&quot;(none)&quot;) const </td></tr>
<tr class="memdesc:abd2ea259e09668217ed2c280ff3c980b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a mapped, NUL-terminated string with the volume's package string.  <a href="#abd2ea259e09668217ed2c280ff3c980b">More...</a><br/></td></tr>
<tr class="separator:abd2ea259e09668217ed2c280ff3c980b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b9d30b6fdd1f0d2a8f3264fec7de048"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a9b9d30b6fdd1f0d2a8f3264fec7de048">title</a> (const char *placeholder=&quot;(untitled)&quot;) const </td></tr>
<tr class="memdesc:a9b9d30b6fdd1f0d2a8f3264fec7de048"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a mapped, NUL-terminated string with the volume's title.  <a href="#a9b9d30b6fdd1f0d2a8f3264fec7de048">More...</a><br/></td></tr>
<tr class="separator:a9b9d30b6fdd1f0d2a8f3264fec7de048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dcb7daa371a7237a938105acb11bd6c"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a2dcb7daa371a7237a938105acb11bd6c"><td class="memTemplItemLeft" align="right" valign="top">T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a2dcb7daa371a7237a938105acb11bd6c">translate</a> (T *va) const </td></tr>
<tr class="memdesc:a2dcb7daa371a7237a938105acb11bd6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate a virtual address in this ELF volume's read-only data segment, into a virtual address in the mapped view of the same program.  <a href="#a2dcb7daa371a7237a938105acb11bd6c">More...</a><br/></td></tr>
<tr class="separator:a2dcb7daa371a7237a938105acb11bd6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a095171a6943c0aeba85d4b654f8f8934"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a095171a6943c0aeba85d4b654f8f8934"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a095171a6943c0aeba85d4b654f8f8934">translate</a> (uint32_t va) const </td></tr>
<tr class="memdesc:a095171a6943c0aeba85d4b654f8f8934"><td class="mdescLeft">&#160;</td><td class="mdescRight">A variant of <a class="el" href="class_sifteo_1_1_mapped_volume.html#a2dcb7daa371a7237a938105acb11bd6c" title="Translate a virtual address in this ELF volume&#39;s read-only data segment, into a virtual address in th...">translate()</a> for pointers that have already been cast to uint32_t, such as pointers that are found in system asset objects. <br/></td></tr>
<tr class="separator:a095171a6943c0aeba85d4b654f8f8934"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa677adfdd74bd1d3ca452e8fa45ccf49"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#aa677adfdd74bd1d3ca452e8fa45ccf49">translate</a> (const _SYSMetadataBootAsset &amp;meta, <a class="el" href="struct_sifteo_1_1_asset_group.html">AssetGroup</a> &amp;group)</td></tr>
<tr class="memdesc:aa677adfdd74bd1d3ca452e8fa45ccf49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate a bootstrap asset metadata record to an <a class="el" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a>.  <a href="#aa677adfdd74bd1d3ca452e8fa45ccf49">More...</a><br/></td></tr>
<tr class="separator:aa677adfdd74bd1d3ca452e8fa45ccf49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f350dace9278fa51234339e7478c866"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a7f350dace9278fa51234339e7478c866">translate</a> (const _SYSMetadataImage *meta, <a class="el" href="struct_sifteo_1_1_asset_image.html">AssetImage</a> &amp;image, <a class="el" href="struct_sifteo_1_1_asset_group.html">AssetGroup</a> &amp;group)</td></tr>
<tr class="memdesc:a7f350dace9278fa51234339e7478c866"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate an image metadata record to an <a class="el" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>.  <a href="#a7f350dace9278fa51234339e7478c866">More...</a><br/></td></tr>
<tr class="separator:a7f350dace9278fa51234339e7478c866"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a900fb37198d6a7d3b7248b606ff7ae3f"><td class="memItemLeft" align="right" valign="top">const UUID *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a900fb37198d6a7d3b7248b606ff7ae3f">uuid</a> () const </td></tr>
<tr class="memdesc:a900fb37198d6a7d3b7248b606ff7ae3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the volume's UUID.  <a href="#a900fb37198d6a7d3b7248b606ff7ae3f">More...</a><br/></td></tr>
<tr class="separator:a900fb37198d6a7d3b7248b606ff7ae3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22ff8098d67194b5cf768ff492047405"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a22ff8098d67194b5cf768ff492047405">version</a> (const char *placeholder=&quot;(none)&quot;) const </td></tr>
<tr class="memdesc:a22ff8098d67194b5cf768ff492047405"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a mapped, NUL-terminated string with the volume's version string.  <a href="#a22ff8098d67194b5cf768ff492047405">More...</a><br/></td></tr>
<tr class="separator:a22ff8098d67194b5cf768ff492047405"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fc06a948bf8e50dc3247146c8f12003"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6fc06a948bf8e50dc3247146c8f12003"></a>
<a class="el" href="class_sifteo_1_1_volume.html">Volume</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_mapped_volume.html#a6fc06a948bf8e50dc3247146c8f12003">volume</a> () const </td></tr>
<tr class="memdesc:a6fc06a948bf8e50dc3247146c8f12003"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a> associated with this mapping. <br/></td></tr>
<tr class="separator:a6fc06a948bf8e50dc3247146c8f12003"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a> that has been mapped into the secondary flash memory region. </p>
<p>This object can be used to access the mapped data.</p>
<p>For Volumes containing a valid ELF binary only.</p>
<p>Only one thing may be mapped into the secondary flash memory region at a time. This means that any time you create a <a class="el" href="class_sifteo_1_1_mapped_volume.html" title="A Volume that has been mapped into the secondary flash memory region.">MappedVolume</a>, any previously existing <a class="el" href="class_sifteo_1_1_mapped_volume.html" title="A Volume that has been mapped into the secondary flash memory region.">MappedVolume</a> becomes no longer valid.</p>
<p>Since only one <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a> can be mapped at a time, it's important to copy data out of the volume into RAM if you need to collect data from multiple volumes. For example, a title can be copied to a <a class="el" href="class_sifteo_1_1_string.html" title="A statically sized character buffer, with output formatting support.">Sifteo::String</a>, or an <a class="el" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a> can be copied to a <a class="el" href="struct_sifteo_1_1_tile_buffer.html" title="A drawable that&#39;s backed by plain memory, instead of by a VideoBuffer.">Sifteo::TileBuffer</a>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="add9790f82b30c3f4226589d3d47fae54"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Sifteo::MappedVolume::MappedVolume </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a detached <a class="el" href="class_sifteo_1_1_mapped_volume.html" title="A Volume that has been mapped into the secondary flash memory region.">MappedVolume</a>. </p>
<p>You must call <a class="el" href="class_sifteo_1_1_mapped_volume.html#a36b85238813ba12465f54ee253a6c0fc" title="Attach this MappedVolume to a new volume.">attach()</a> to connect this to a <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>. </p>

</div>
</div>
<a class="anchor" id="a30d71f4ac5f9e4e5cb7e3a7fb465ccbc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Sifteo::MappedVolume::MappedVolume </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_sifteo_1_1_volume.html">Volume</a>&#160;</td>
          <td class="paramname"><em>vol</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Map a view of the provided <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>. </p>
<p>The volume must contain an ELF binary. No other <a class="el" href="class_sifteo_1_1_mapped_volume.html" title="A Volume that has been mapped into the secondary flash memory region.">MappedVolume</a> instances may exist at this time. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a36b85238813ba12465f54ee253a6c0fc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::MappedVolume::attach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_sifteo_1_1_volume.html">Volume</a>&#160;</td>
          <td class="paramname"><em>vol</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Attach this <a class="el" href="class_sifteo_1_1_mapped_volume.html" title="A Volume that has been mapped into the secondary flash memory region.">MappedVolume</a> to a new volume. </p>
<p>Pointers obtained prior to this reattachment, if any, will no longer be valid. </p>

</div>
</div>
<a class="anchor" id="aa996a30a54f8ad245c0299c00a1e2152"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void* Sifteo::MappedVolume::metadata </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>minSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned *&#160;</td>
          <td class="paramname"><em>actualSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Look up a metadata value from the mapped <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>. </p>
<p>On success, returns a pointer to the value, and (if actualSize is not NULL) writes the actual size of the metadata value to *actualSize.</p>
<p>If the metadata value is not found, or it's smaller than minSize, returns NULL.</p>
<p>Note that the 'actualSize' parameter here is required, in order to reliably differentiate this from the 1- or 2-argument form of <a class="el" href="class_sifteo_1_1_mapped_volume.html#aa996a30a54f8ad245c0299c00a1e2152" title="Look up a metadata value from the mapped Volume.">metadata()</a>. </p>

</div>
</div>
<a class="anchor" id="af5cd63cd63e7887ccb64457010ff5445"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const T* Sifteo::MappedVolume::metadata </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned *&#160;</td>
          <td class="paramname"><em>actualSize</em> = <code><a class="el" href="group__macros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Look up a metadata value from the mapped <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a>. The result is cast to a constant pointer of the indicated type, and we require that the metadata value is at least as large as sizeof(T). </p>
<p>On success, returns a pointer to the value, and (if actualSize is not NULL) writes the actual size of the metadata value to *actualSize.</p>
<p>If the metadata value is not found, or it's smaller than sizeof(T), returns NULL.</p>
<p>Use this form of <a class="el" href="class_sifteo_1_1_mapped_volume.html#aa996a30a54f8ad245c0299c00a1e2152" title="Look up a metadata value from the mapped Volume.">metadata()</a> in the common case when minSize equals the size of the object you're retrieving a pointer to. </p>

</div>
</div>
<a class="anchor" id="abd2ea259e09668217ed2c280ff3c980b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char* Sifteo::MappedVolume::package </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>placeholder</em> = <code>&quot;(none)&quot;</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve a mapped, NUL-terminated string with the volume's package string. </p>
<p>Always returns a valid pointer. If the game has no package, returns a placeholder string. </p>

</div>
</div>
<a class="anchor" id="a9b9d30b6fdd1f0d2a8f3264fec7de048"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char* Sifteo::MappedVolume::title </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>placeholder</em> = <code>&quot;(untitled)&quot;</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve a mapped, NUL-terminated string with the volume's title. </p>
<p>Always returns a valid pointer. If the game has no title, returns a placeholder string. </p>

</div>
</div>
<a class="anchor" id="a2dcb7daa371a7237a938105acb11bd6c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T* Sifteo::MappedVolume::translate </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>va</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Translate a virtual address in this ELF volume's read-only data segment, into a virtual address in the mapped view of the same program. </p>
<p>This accounts for the difference between the primary and secondary flash address spaces, as well as the offset between the RODATA segment and the beginning of the ELF file. </p>

</div>
</div>
<a class="anchor" id="aa677adfdd74bd1d3ca452e8fa45ccf49"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::MappedVolume::translate </td>
          <td>(</td>
          <td class="paramtype">const _SYSMetadataBootAsset &amp;&#160;</td>
          <td class="paramname"><em>meta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_asset_group.html">AssetGroup</a> &amp;&#160;</td>
          <td class="paramname"><em>group</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Translate a bootstrap asset metadata record to an <a class="el" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a>. </p>
<p>Using this object's memory mapping, convert a _SYSMetadataBootAsset record into an <a class="el" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> which can be used to load the corresponding assets.</p>
<p>This is only useful for programs which must bootstrap another program's assets. </p>

</div>
</div>
<a class="anchor" id="a7f350dace9278fa51234339e7478c866"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Sifteo::MappedVolume::translate </td>
          <td>(</td>
          <td class="paramtype">const _SYSMetadataImage *&#160;</td>
          <td class="paramname"><em>meta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_asset_image.html">AssetImage</a> &amp;&#160;</td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_sifteo_1_1_asset_group.html">AssetGroup</a> &amp;&#160;</td>
          <td class="paramname"><em>group</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Translate an image metadata record to an <a class="el" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a>. </p>
<p>Using this object's memory mapping, convert a _SYSMetadataImage record into an <a class="el" href="struct_sifteo_1_1_asset_image.html" title="Any kind of asset image, as defined in your stir script.">AssetImage</a> which references the image data mapped in from another volume.</p>
<p>Since the _SYSMetadataImage only stores information about the read-only data associated with an <a class="el" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a>, you must also supply an <a class="el" href="struct_sifteo_1_1_asset_group.html" title="A bundle of compressed tile data, for use by AssetImages.">AssetGroup</a> object to be used for the read-write storage of state, such as load addresses for the group on each cube</p>
<p>This function can be used to load graphics assets from another game or other <a class="el" href="class_sifteo_1_1_volume.html" title="A coarse-grained region of external memory.">Volume</a> on the system, as long as those assets have been annotated in their game's metadata. </p>

</div>
</div>
<a class="anchor" id="a900fb37198d6a7d3b7248b606ff7ae3f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const UUID* Sifteo::MappedVolume::uuid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve the volume's UUID. </p>
<p>Always returns a valid pointer. If there is no UUID, returns an all-zero dummy UUID. </p>

</div>
</div>
<a class="anchor" id="a22ff8098d67194b5cf768ff492047405"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const char* Sifteo::MappedVolume::version </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>placeholder</em> = <code>&quot;(none)&quot;</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve a mapped, NUL-terminated string with the volume's version string. </p>
<p>Always returns a valid pointer. If the game has no package, returns a placeholder string. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="filesystem_8h_source.html">filesystem.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
